﻿<UserControl x:Class="Twi.COMMON.WPF.QueryConditionComponent"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d">
    <Grid>
        <Grid.Resources>
            <ResourceDictionary>
                <Style TargetType="{x:Type CheckBox}">
                    <Setter Property="Margin" Value="0,6,0,0"/>
                    <Setter Property="VerticalAlignment" Value="Top"></Setter>
                    <Setter Property="HorizontalAlignment" Value="Center"></Setter>
                    <Setter Property="Height" Value="23"></Setter>
                </Style>
                <Style TargetType="{x:Type ComboBox}">
                    <Setter Property="Margin" Value="0,0,3,0"/>
                    <Setter Property="Height" Value="23"></Setter>
                    <Setter Property="SelectedValuePath" Value="Tag"></Setter>
                    <Setter Property="SelectedValue" Value="1"></Setter>
                </Style>
                <Style TargetType="{x:Type TextBox}">
                    <Setter Property="Margin" Value="0,2,3,0"/>
                    <Setter Property="VerticalAlignment" Value="Top"></Setter>
                    <Setter Property="Height" Value="23"></Setter>
                 </Style>
                <Style TargetType="{x:Type DatePicker}">
                    <Setter Property="Margin" Value="0,2,3,0"/>
                    <Setter Property="VerticalAlignment" Value="Top"></Setter>
                    <Setter Property="Height" Value="23"></Setter>
                </Style>
            </ResourceDictionary>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="20"></ColumnDefinition>
            <ColumnDefinition Width="110"></ColumnDefinition>
            <ColumnDefinition Name="ColumnDefinTextComparison" Width="65"></ColumnDefinition>
            <ColumnDefinition Width="100*"></ColumnDefinition>
            <ColumnDefinition Width="23"></ColumnDefinition>
            <ColumnDefinition Width="105"></ColumnDefinition>
            <ColumnDefinition Name="ColumnDefinDateComparison" Width="55"></ColumnDefinition>
            <ColumnDefinition Width="100"></ColumnDefinition>
            <ColumnDefinition Width="23"></ColumnDefinition>
            <ColumnDefinition Width="100"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <CheckBox Grid.Row="0" Grid.Column="0" Name="ChkText" TabIndex="10"/>
        <ComboBox x:FieldModifier="public"  Grid.Column="1" Background="White" Name="CobTextColName" TabIndex="20" DisplayMemberPath="Element[ColumnDisplayName].Value" Margin="0,3,3,3"></ComboBox>
        <ComboBox Grid.Column="2" Background="White" Name="CobTextComparison" TabIndex="30" SelectedValuePath="Tag" Margin="0,3,3,3">
            <ComboBoxItem IsSelected="True" Content="类似于" Tag="1" TabIndex="40"  />
            <ComboBoxItem Content="等于" Tag="2" />
            <ComboBoxItem Content="不等于" Tag="3" /> 
        </ComboBox>
        <TextBox Grid.Column="3" Name="TxtTextContent" MinWidth="100" Margin="0,3,3,0"></TextBox>
        <CheckBox Grid.Column="4" Name="ChkDate" TabIndex="50" Margin="8,6,2,0" />
        <ComboBox Grid.Column="5" x:FieldModifier="public" Background="White" Name="CobDateColName" DisplayMemberPath="Element[ColumnDisplayName].Value" TabIndex="60" Margin="0,3,3,3" />
        <ComboBox Grid.Column="6" Background="White" Name="CobDateComparison" TabIndex="70" Margin="0,3,3,3">
            <ComboBoxItem IsSelected="True" Content="之间" Tag="1"  />
            <ComboBoxItem Content="晚于" Tag="2" />
            <ComboBoxItem Content="早于" Tag="3" />
        </ComboBox>
        <DatePicker Grid.Column="7" Name="Date1" TabIndex="80" Margin="0,3,0,0" />
        <Label Grid.Row="1" Grid.Column="8" Content="至" Name="LblAnd"/>
        <DatePicker Grid.Column="9" Name="Date2" TabIndex="90" Margin="0,3,0,0"/>
    </Grid>
</UserControl>
